﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <meta name="viewport" id="WebViewport"
          content="width=720px,initial-scale=1,target-densitydpi=device-dpi,minimum-scale=0.3,maximum-scale=1,user-scalable=no"/>
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <script src="../js/jquery.min.js"></script>


    <style type="text/css">
        <!--
        @viewport {
            zoom: 1.0;
            width: 720px;
        }

        @-ms-viewport {
            width: 720px;
            zoom: 1.0;
        }

        body {
            background-color: #ffffff;
            margin-left: 0px;
            margin-top: 0px;
            margin-right: 0px;
            margin-bottom: 0px;
            background-size: 100% auto;
            background-image: url(images/_1.jpg);
            background-repeat: repeat-y
        }

        body, td, th {
            color: #520000;
            font-size: 20px;
            font-family: "微软雅黑";
        }

        .ys {
            font-family: 15px;
            color: #5A2400;
            text-align: center;
            width: 23%;
            height: 30px;
            float: left
        }

        li {
            clear: left
        }

        -->
    </style>
    <script>
        /////////////////接口代码在页面最下面
        if (screen.width < 720) {
            document.getElementById('WebViewport').setAttribute('content', 'width=720px,initial-scale=' + screen.width / 720 + ',target-densitydpi=device-dpi,minimum-scale=0.3,maximum-scale=1,user-scalable=no');
        }
        ///////////////////////////////////////////////////////////////////////////////////////////////////


    </script>

</head>

<body onLoad=""
      style="background-color:#ffffff; text-align:center; background-image:url(bgpic.jpg); background-position:center -200px">

<div style=" position:absolute; left:50%; top:50%; margin-left:-332px; margin-top:-510px; background-image:url(ph.png); z-index:1000; width:664px; height:1020px; text-align:center">
    <div style="height:300px"></div>
    <ul style=" margin:0 auto; width:80%; height:520px; list-style:none; overflow-y:scroll" id="content">
        <li v-for="d in data">
            <div class="ys">{{d.qi}}</div>
            <div class="ys" style="width:43%">{{d.winIndex%2==0?"杰克":"约翰"}}</div>
            <div class="ys" style="width:33%">{{d.winIndex+1}}</div>
        </li>
    </ul>
    <div style="height:100px"></div>
    <div style="height:150px; width:100%;" onClick="window.parent.endfun1()"></div>
    <script src="../js/vue.js"></script>

</div>


<script>

    var host = "game.zbswzn.cn"
    // var host = "10.168.1.182:8085"

    function getinfo() {
        var url = window.document.location.href.toString();
        var u = url.split("?");
        if (typeof(u[1]) == "string") {
            var get = {};
            get['domain'] = u[0];
            u = u[1].split("&");
            for (var i in u) {
                var j = u[i].split("=");
                get[j[0]] = j[1];
            }
            return get;
        }
        else {
            return {};
        }
    }

    var token = getinfo().token;

    if (!token)
        native.closeGame();

    var wsVue = new Vue({
        el: '#content',
        data: {
            data: []
        },
        mounted: function () {
            setTimeout(getCowBoyRecord, 500)
        }
    });


    function getCowBoyRecord() {
        $.ajax({
            url: 'http://' + host + '/getCowBoyRecord',
            type: 'get',
            beforeSend: function (request) {
                request.setRequestHeader("userToken", token);
            },
            success: function (data) {
                wsVue.data = data.data;
            },
            fail: function () {
                //调用约定方法，关闭游戏
                native.closeGame();
            }
        });
    }


</script>


</body>
</html>